package com.example.demo.publish;

import com.example.demo.annoations.NotThreadSafe;
import lombok.extern.slf4j.Slf4j;

import java.util.Arrays;

@Slf4j
@NotThreadSafe
public class UnsafePublish {


    private String[] states = {"a","b","c"};

    public String[] getStates(){

        return states;
    }


    public static void main(String[] args) {

        UnsafePublish unsafePublish = new UnsafePublish();


        unsafePublish.getStates()[1] = "s";
        log.info("{}", Arrays.toString(unsafePublish.getStates()));

    }
}
